I brewed a coffee stout a few months ago. I ended up using about 500 grams, and soaking it in the wort right after the boil for something like half an hour. I ended up just using decaf for most of it (70% decaf, 30% regular espresso ground) because that was what I had on hand. I think it was Starbucks, actually -- a gift from a friend leaving Korea, where I live and where decaf isn't as common.
I ground it very fine, like espresso grind, and that worked well, but if you're not planning on a secondary fermentation I'd go with a coarser grind as a certain amount of coffee grounds came through the hop bag (as expected) and settled into the bottom of the bucket. By the way it really did a number on my hop bag, staining it and so on.
Anyway, when I tried the beer after a longish secondary and a few weeks of bottle-conditioning, it was horrible, as if someone had dumped pure over-boiled coffee into a bottle of stout. I mean HORRIBLE!
However, that third week worked some kind of magic on it, and the coffee flavor mellowed amazingly well, so that the final product was actually really satisying. Everyone who's tried it has really liked it, and now while I'm abroad on holiday I wish I'd brought a couple more bottles of the stuff with me! That said, I suspect having a few bottles of the coffee stout in a row might be a bit too much: it's a bit like a dessert wine in that way.
So I think next time I'll probably try the cold infusion method, as it'll eliminate the overpowering bitterness and coffee flavoring that originally was so objectionable, and will probably allow for a greater subtlety after mellowing. But I think I'll do the cold infusion with a much bigger amount of water than some recommend. That, or I'll buy some Dutch cold-drip coffee from this place down the road, and mix that into the wort. That stuff is strong (yet mellow) enough to make up for being a smaller amount mixed into a bigger wort, I think. (And I think if I were doing all-grain, it could probably stand to be boiled like the rest of the wort without any weird effects.
I suspect the finer the grind, the better the extraction is, but if you're putting the coffee right into the wort I'd definitely plan on a secondary fermentation for clearing and so on.