The computer managed to go down in 6 spades on this one. No, it wasn't an opening lead of a club through the king. West actually led a diamond, and the ace of clubs was onsides anyway. No, it was just a careless handling of his potential. So . . let's count our winners, starting with the top and obvious: you have three diamonds, two hearts and 5 spades for ten (in spades, start with the A or K so that on the worst possible 4-0 break, you'll have a marked finesse for 5 regardless of which defender has 4 of 'em). There are a couple of ways to pick up the next two tricks, one being to ruff two hearts in dummy, the other being to establish the long diamonds. One of these ways is far more attractive than the other, and I hope you see which it is.
If you go for ruffing two hearts, then you can't be in dummy with all trump out if trump split 3-1 (the favored split). In that case, you not only couldn't hope to cash the long diamonds. You might not even be able to cash the top three! How about ruffing one diamond and preparing for a 4-2 split in the suit. Let's see if that gives us enough winners: There'll be five diamond winners (the one you ruff is countaaed as a spade winner, not a diamond), five spades in the long hand, a ruff in the short for 6 of them and two top hearts for 13. Well, you can't get any more than that.
So the first thing we want to do is unblock the diamonds by cashing the A, followed by cashing the A K of spades. I'm first looking warily to see if I get the rather unpleasant surprise of a 4-0 split, which would require some rethinking, and am thankful that doesn't happen. I then note that I have a 3-1 split, which doesn't require any rethinking. Further, East has the long spades, so I can ruff a diamond without fear of overruff, which I do.
Everyone follows to the second diamond, which means we now have a lock on the 13 tricks counted above, since diamonds cannot split any worse than 4-2. Cash the queen of spades, drawing the last trump, cash a high heart, ruff a heart and run diamonds. You have four of them at that point, and will sluff three small clubs and a small heart. The closed hand will be left with the top heart and the last trump.
You would do well to note that as we work out where our winners are coming from, we also willy-nilly plan our play. We want to run diamonds, so we don't want to ruff a heart early, for that's going to be an entry. Oh, true, as the cards lie, you could ruff a heart early, go to the ace of spades, ruff a diamond, then cash the queen of spades, then to the king and run diamonds. But you do run the danger of an overruff if West led a singleton diamond. I'd like to get two trump leads in anyway.
When I see the 3-1 split, the trump on my right, then I can ruff a diamond, note the "no worse than" 4-2 split, draw the last trump, cash a heart, ruff a heart and run diamonds. It's time to claim.
Well, one last question: how many winners to you have, given that you can sluff all clubs from the closed hand? Can the second heart honor be worth a trick, and how many trump does the closed hand have? This may look too obvious to answer to some, but players have been known to sluff the wrong card on the second heart or dismiss it as useless in such a situation since you're counting out from dummy. But the K of hearts is worth an overtrick:
You sluff all clubs from the closed hand, but you have only one trump left there (three leads and the ruff of a diamond) and so cannot ruff two clubs from dummy. That at least spares you from leading toward K low. However, you can sluff a club from dummy on the second heart honor, and then ruff a club, one club, in the closed hand for all the marbles.
On a hand with a side-suit of six diamonds in dummy, I chose to establish the suit by ruffing in the closed hand, spending my last trump on the lead that established the diamonds. Dummy now showed one loser in a suit where I'd shown out early in the hand (I forget what suit, call it a spade). Now with running diamonds and an entry showing, a would-be know-it-all slammed his cards down, loudly, with the implication that the hand was finished and sharp people would know that. "What're you doing?" I exclaimed, and then had to tell him that his side had a spade trick coming. If I'm out of spades in the closed hand, that doesn't mean I can ruff that last spade.
I once pointed out that a void in a trump contract doesn't mean you can necessarily ruff a side suit. You'd be surprised at the people who wanted to challenge that. "How come?" one person said. Well, for heaven's sake, you can't ruff in the hand with a void if you also have no trump. Yet I've not only seen people get flummoxed on this simple axiom, but my fellow players at the table seemed to think I'd lost my mind.