This is the disease of waswaas and in order to get rid of it, don't pay attention to any of your doubts, pray your namaz quickly, keep something as a sign to help you with number of rakaats completed. You will also need to contact a counselor to help you with bringing this under control