Depends. If the form is simply built on a filtered list then you base your dcount on the same filtered query not on the table.
If you want to do filters dynamically you will have to build a function that passes in the ID and uses the form's actual recordset to determine the absolute position of the id in the recordset and the function can return odd or even. Then call that function from the query.
IsEven:MyFunctionIsEven([StateID])
Unfortunately I do not have time now to demo.
Public Function IsOddEven(StateID As String) As String
With Me.RecordsetClone
.FindFirst "stateID = '" & StateID & "'"
If .AbsolutePosition Mod 2 = 0 Then
IsOddEven = "Even"
Else
IsOddEven = "Odd"
End If
End With
End Function