Is it possible to set a limit for the number of transaction each token can have in solidity? for example, a token can only transfer 10 times.
ERC20 tokens are fungible. Any one unit (or sub unit) of an ERC20 token is identical to others.
Due to this, it isn't possible to limit transfers on a token-bases. You could limit the ability of addresses to transfer the token, but limiting the token itself is not possible, since you cannot tell which unit of a token has been transferred before.
ERC721 tokens would support this, however, since they are non-fungible. You could include an attribute in the ERC721 token that counts the number of times it has been transferred.