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):
To increase the enchantment level, bookshelves can be placed next to the enchanting 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 enchanting table.
The maximum level of Fortune1 is a "Level 30" 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).
1. Fortune 1 and 2 can be accessed at lower levels below the maximum; but for simplicity's sake I have only included the Requirements for Fortune 3. There is a lot of calculations and variables that go into selecting an Enchantment, let alone a specific one. See Enchanting Mechanics for more information