You need to determine the number of total nights during the year that your son lived with you. If it was 183 or more, then you are considered the custodial parent and can claim the custodial parent tax benefits which include Earned Income Credit and Child and Dependent Care Credit. If he lived with you ex 183 nights or more, then she is the one who is the custodial parent.
If the court did not specify who could claim the child as a dependent each year, then the custodial parent gets to decide who can claim him as a dependent and get the child tax credit for a child under the age of 17. The custodial parent can let the other parent claim him if the custodial parent chooses to and completes form 8332 relinquishing dependency.
Child tax benefits cannot be split any other way.