how many beats in a bar

That depends on what the time signature is. if it is 4/4 time, then there are 4 beats and every quarter note will get one beat. The Time signature will be at the beginning of each line, right next to the clef sign.

http://www.musictheory.halifax.ns.ca/6measures.html

To determine the number of beats in a bar, you generally need to know the time signature of the music. The time signature is represented as a fraction located at the beginning of a musical piece, consisting of two numbers stacked vertically. The top number represents the number of beats in a bar, while the bottom number represents the note value that receives one beat.

For example, in 4/4 time signature (also known as common time), there are four beats in each bar, and the quarter note receives one beat. This is the most common time signature in popular music.

Other common time signatures include 3/4 time (three beats in a bar, with the quarter note receiving one beat), 2/4 time (two beats in a bar, with the quarter note receiving one beat), and 6/8 time (six beats in a bar, with the eighth note receiving one beat).

To find out the number of beats in a bar, look for the time signature at the beginning of the music piece.