Let $S_8$ be the set of all permutations of $1,2,\dots, 8$. For example $\sigma=(8,5,4,3,1,2,6,7)$ is a permutation . We define the equivalence relation $\sim$ on $S_8$ such that if two odd (or even) neighboring numbers in a permutation $\sigma$ are interchanged, the derived permutation $\tau$, is equivalent to $\sigma$, that is, $\sigma \sim \tau$. For example:
$$(8,5,4,3,1,2,6,7)\sim (8,5,4,3,1,6,2,7) \sim (8,5,4,1,3,6,2,7)$$
I wrote a program which says there are 6902 equivalence classes (if it is a correct program). Is there a simpler mathematical method to count the number of equivalence classes?
Note: $(8,5,4,3,1,2,6,7)$ is an arrangement of numbers and has nothing to do with cyclic permutations.