O=C(Oc1ccccc1)N1CCC2(CCCN(c3ccccn3)C2)CC1
A rotatable bond is defined as any single non-ring bond, attached to a non-terminal, non-hydrogen atom. Amide C-N bonds are not counted because of their high barrier to rotation.  How many rotatable bonds does the molecule have?