If you are a Macintosh user and inexplicably get this error ...
The number of observations is 0. Check your data and format statement.
... check that the input file you're using is in PC ANSI plain-text format, not MAC ANSI plain-text format. If, like me, you prepare your data in Stata and use the Stata2Mplus command to export the data, Stata2Mplus will create a Mac-format .inp and .dat text file that Mplus won't be able to read.
This can also happen if you prepare your input files from scratch in a Macintosh text editor and then ship them over to Windows to use Mplus.
There are various text editors, including TextEdit for Windows, that can convert files from Mac to PC encoding.