Async counter that counts up to 10
Ok, i fixed it. I had to connect the clock of each flip flop to the inverted output Q\ of the previous flip flop. Then I connected the display with the outputs Q and I put as input to the AND gate the Q outputs of the second and the last flip flop.