Counting
Choose a number "n"
Get "n" card.
Choose a number "a" so that a > n/2. Like 6 > 10/2, 8 > 13/2.
Check the last card.
Count "a" cards, then put the rest on top. Do it 2 more times. (3 times in total)
The last card is on the top
If you do it 4 times, you reorder the list of cards
Listing
n = 10, a = 6
[ 1 ,2, 3, 4, 5, 6| 7, 8, 9,10] # original order
[ 7, 8, 9,10| 6, 5| 4, 3, 2, 1] # 1 time
[ 4, 3, 2, 1| 5, 6|10, 9, 8, 7] # 2 times
[ 10,9, 8, 7| 6, 5| 1, 2, 3, 4] # 3 times
[ 1, 2, 3, 4| 5, 6, 7, 8, 9,10] # 4 times = original order
n = 13, a = 8
[ K, Q, J,10, 9, 8, 7, 6| 5, 4, 3, 2, 1]
[ 5, 4, 3, 2, 1| 6, 7, 8| 9,10, J, Q, K]
[ 9,10, J, Q, K| 8, 7, 6| 1, 2, 3, 4, 5]
[ 1, 2, 3, 4, 5| 6, 7, 8| K, Q, J,10, 9]
[ K, Q, J,10, 9| 8, 7, 6, 5, 4, 3, 2, 1]
Source: Quick Mathematical Card Trick