Check if character exists in string [duplicate]

So I have this string:
mystring = "[email protected]"

And I want to check how many @ there is there.
If there is more than 1 @ if statement alert error.

If there is only 1 check if the first part of the string has more than 64 characters and the other 255 using split(“@”).