So this song is notated with a key signature of D minor, but it’s really a modal tune in D dorian. Which you can think of as a C major scale, but starting and ending on D:
D E F G A B C D
That scale contains a B, instead of Bb.
For the measure that’s tricky, I’d recommend counting eighth notes and clapping on the hits. Which I’ve shown as the first line. But when you go to play it, I’d simplify the count to what I showed in the second line:

Hope that helps!