The first example is called anticipation and i would say it probably can be considered to be on a strong beat. The second example is not so clear because it will create syncopation, it might be both ways depending on your musical context. Now generally i think about it like this: if the chord tones are present on the strong beat, they count, if not - they might not.