Tic tac toe

In the game of Noughts and Crosses there are 8 distinct winning lines. How many distinct winning lines are there in a game played on a 3 by 3 by 3 board, with 27 cells?

Problem

The ideas in this problem have been expanded and made into another, more detailed investigation. See Marbles in a Box.
In the game of Tic Tac Toe (i.e. noughts and crosses) there are 8 distinct winning lines.

Investigate how many distinct winning lines there are in a game played on a 3 by 3 by 3 board, with 27 cells.

A winning line connects 3 cells.

Image
Tic Tac Toe