Explained split counting inversions method