Answer based on context:

Other projects were made for the occupation of parts of Brazil in 1579, following the death of Sebastian of Portugal at the Battle of Alcácer Quibir, and also in 1582 under Admiral Filippo di Piero Strozzi, cousin of Catherine de Médicis. During that period the crowns of Spain and Portugal were united under the same king, the Dutch attacked and captured Salvador de Bahia and the island of Fernando de Noronha, but a Portuguese-Spanish fleet very soon recovered those cities. In the 17th century, France again briefly established a colony in Brazil with the establishment of France Equinoxiale. On 21 September 1711, in the 11-day Battle of Rio de Janeiro, René Duguay-Trouin captured Rio de Janeiro, then believed impregnable, with twelve ships and 6,000 men, in spite of the defence consisting of seven ships of the line, five forts and 12,000 men; he held the governor for ransom. Investors in this venture doubled their money, and Duguay-Trouin earned a promotion to Lieutenant général de la Marine.

How many ships, forts, and men did Rio de Janeiro have defending the attack?
12012