That statement is needlessly convoluted. If you're going to use an increment or decrement operator like count++ or count--, you should do it all by itself on its own line.
Never mix it with other statements. Inside the head of a for loop, such as for(count=0; count<10; count++), is fine because the count++ is its own independent statement. When you mix something like that in with the rest of a statement, you make things unpredictable because your variable will be incremented somewhere midstream and you'll lose track of the variables.
Also, that if statement will always be true regardless of what the value of count is. Modular division only considers the remainder. If you divide any number by 2, the highest remainder you can get is 1. So any number % 2 will != 2.
You're on the right track, except for your misplaced curly brackets, as others have mentioned. Whenever you do a loop, if, or switch, the only thing that is affected by it is the very next statement. In this case, your for-loop has only one statement affected--the
System.out.print(count +", "). To get around this and include more statements, you need to wrap your code up in curly brackets. Everything in curly brackets following a conditional will be affected by that conditional. So....
for(int x=1; x<10; x++)
...only this statement is affected by the for loop...
for(int y=10; y>10; y--)
{
...this statement is affected by the loop....
....so is this one....
..... this one too...
}
...this one is not...
Some folks say that as a best practice you should do a curly bracket after every conditional, even if you only have one statement. There's no harm in doing that.
Your if statement needs adjustment too. Ask yourself this: what is 4 % 2 (the remainder when you do 4 / 2). What is 5 % 2? What is 6 % 2? Get rid of that count++ in the condition.. it's incrementing a variable that doesn't need to be incremented and as I said that kind of thing is ridiculously confusing.
--- Update ---
Also, use println instead of print. Println automatically adds a newline at the end of each line and makes output much easier to read.