shuffle until original configuration recurs, and keep count
while(!original(configuration,n))
{
perfectshuffle(configuration,n);
numbershuffles++;
}