I've been trying to get a fortune enchantment for a while and I made plenty of bookshelves and it hasn't been enough.
From the wiki (emphasis mine):
In order to increase the enchantment level, a bookshelf should be placed next to the enchantment table while keeping one block of air between them. To gain access to the previously mentioned level 30 enchantments, a total of 15 bookshelves need to be placed around the enchantment table. See the enchantment mechanics page for more detailed information on this.
Fortune is a "Level 3" enchantment, but there is never going to be a guarantee that you will get the Fortune enchantment.
You can limit this by enchanting only picks, shovels and axes, to which fortune can be applied, meaning that the chance of getting Fortune will be better than enchanting books (which can have any enchantment applied).