This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In DOS format they should be equal, in Unix format the number of carriage return should be 0. You'll need to find out what to do if:
the number of carriage returns is between 0 and the number of line breaks
the number of carriage returns is larger than the number of line breaks, with special subcase if the number of carriage returns is larger than 0 and the number of line breaks is 0 (basically an old Mac OS file)