Did they not consider that Allah knows whatever is in the skies and whatever is in the earth. There is no secret talk (between) three but He is the fourth of them nor (between) five but He is the sixth of them {1}, nor less than that nor more but He is with them wherever they are, then on the day of resurrection He will inform them about that which they did, Allah is certainly the Knower of everything.
Allah (SWT) numbers Himself probably to make it clear that He is a Separate Being. He knows the secret talks of the infidels. Secret talks or consultations should not be for sin but for righteous deeds.
Allah numbers Himself as fourth, sixth etc. probably to indicate that He is different from the creation.