Is it referring to the bar number or the octave in which the note is present?
It is called scientific pitch notation. From wikipedia we have:
Scientific pitch notation (or SPN, also known as American Standard Pitch Notation (ASPN) and International Pitch Notation (IPN))1 is a method of specifying musical pitch by combining a musical note name (with accidental if needed) and a number identifying the pitch's octave.
So the number is the octave. Middle C is in octave 4.