Im trying to figure the number of measures using the bpm and the length of the song. So I was wondering if you have any ways I could figure it out for me.
Impossible in general. There's not enough information. For example, a song at 120bpm lasting 2 minutes would have 1bps but 30 measures in 4/4 and 40 measures in 3/4. Of course, should you have a good guess at the time signature, any of the two (length, time signature, bpm) can be computed from the other three.
Multiply minutes by bpm, giving you total number of beats. Pop and rock music is typically in 4/4 time, 4 beats per measure. So divide by 4 to get number of measures. If the music is more complex, you will have to be more clever.