How do I count the notes circled in white?
The notes in the first example are "grace notes," and are meant to be played quickly as an ornament with the main note starting on the downbeat. (Imagine someone saying "and-a-one, and-a-two"... those two notes are the "and-a" part.)
In the second example, the first note is a sixteenth note, which is half as long as the eighth note before it. After the sixteenth note, you have a dotted eighth note tied to a quarter note... the short answer here is that after playing the B sixteenth note, hold out the A until beat three when the half note starts.
The more detailed answer: a dot extends the length of a note by half of its value. So an eighth note is equal to two sixteenth notes, and a dotted eighth note is equal to three sixteenth notes. A tie connects two notes together to make them one long note.
What might be throwing you off is that eighth notes and smaller note values can be notated with flags (like the C in the previous measure) or with beams (like what you have circled). Number of beams equals number of flags, so one beam is an eighth note, two beams is a sixteenth notes, etc.
The first example, "grace notes" are not counted as part of the rhythm. They are inserted very quickly before the C on beat 1. You can take a little time away from the end of the previous measure to accommodate them.
The second example is typically counted this way:
B A----(A)----- G---------------| 1 e & a 2 e & a 3 e & a 4 e & a |
where 1 e & a represent the 16th-note division of the beat. The () mean you don't re-play the A, just continue to hold it.