What are the rules for counting lines of code in a Java program?

My first guess was every ";", but that won't work for the for loops, which would have 2 lines in themselves...