Count of Barcelona
The County of Barcelona was created by Charlemagne after he had conquered lands north of the river Ebro. These lands, called the Marca Hispanica, were partitioned into various counties, of which the Count of Barcelona, usually holding other counties simultaneously, eventually obtained the primacy over the region.
In the 12th century the Counts formed a dynastic union with the Kingdom of Aragon, merging the two realms under a single ruler. In 1258, the king of France relinquished his feudal authority over the County in the Treaty of Corbeil.
Barcelona remained part of the Crown of Aragon when the latter around 1500 entered into a union with the Kingdom of Castile, thereby forming the Spanish Kingdom. It maintained its own laws, taxes and privileges until they were removed after the War of the Spanish Succession in the 18th century.
Count of Barcelona remained one of the many hereditary titles of the Spanish monarchy.
In the 20th century, the title regained some prominence when Juan de Borbón, the exiled heir to the Spanish throne, adopted the title of Count of Barcelona. In doing so, he claimed a historical royal title without claiming to be the current king of Spain, especially after his son Juan Carlos became the prospective successor of the then-ruler of Spain, Francisco Franco. In 1977, after Juan Carlos had become King upon Franco's death in 1975, he officially awarded the title of Count of Barcelona to his father, who had renounced his rights to the throne. Juan held that title until his death in 1993, when it reverted to the King who has held it ever since. Juan de Borbón's widow used the title Countess of Barcelona until her death in 2000.
List of Counts of Barcelona 
Non-dynastic, 801-878 
|Berà, Count of Barcelona||801-820||son of Guilhèm I of Razès, brother of Bello of Razès, also Count of Razès and Conflent (790-820), Girona, Besalú, Ausona (812/817-820), deposed.|
|820-826||also Count of Girona and Besalú|
|826-832||son of William of Gellone, also margrave of Septimania (834-835) and Imperial Chamberlain (829-830), deposed.|
|Berenguer||832-835||also Count of Toulouse.|
|836-844||restored, executed on orders of Charles the Bald.|
|Sunifred||844-848||son or son-in-law of Belló of Carcassone, also Count of Ausona, Besalú, Girona, Narbonne, Agde, Béziers, Lodève, Melgueil, Cerdanya, Urgell, Conflent and Nîmes.|
|848-850||son of Bernard I, also Count of Toulouse (844-850), rebelled and was killed.|
|Aleran||850-852||jointly with Isembart, also Count of Empúries and Roussillon and Margrave of Septimania.|
|Isembart||850-852||son of Guerin of Provence, jointly with Aleran, also Count of Empúries and Roussillon and Margrave of Septimania.|
|Odalric||852-858||son of Hunfrid, Margrave of Istria, also Count of Girona, Roussillon, Empúries and Margrave of Septimania.|
|Humfrid||858-864||son of Hunfrid II, Duke of Rhaetia, also Count of Girona, Empúries, Roussillon, and Narbonne and Margrave of Gothia.|
|Bernard II (Bernat II)||865-878||son of Bernard of Poitiers also Count of Girona and Margrave of Gothia and Septimania, rebelled.|
House of Sunifred, 878-1162 
el Pelós (the Hairy)
|878-897||son of Sunifred, managed to establish hereditary succession|
|Wilfred II Borrell I
(Guifré II Borrell)
|897-911||son of Wilfred the Hairy|
|Sunyer||911-947||son of Wilfred the Hairy, retired to a monastery|
|Borrell II||947-992||son of Sunyer
jointly with Miro (947-966) and Ramon Borrell (988-992),
also Count of Urgell (948-992). Unsuccessfully asked King Lothair of France for aid against the Saracens, refused to recognise Hugh Capet as King of France in 987.
|Miro||947-966||son of Sunyer, jointly with Borrell II|
|Ramon Borrell||988-1018||son of Borrell II, jointly with his father (988-992)|
|Berenguer Ramon I
el Corbat (the Crooked)
|1018-1035||son of Ramon Borrell, under the regency of Ermesinde of Carcassonne (1018-1023), forced to recognise the suzerainty of Sancho the Great of Navarre.|
|Ramon Berenguer I
el Vell (the Old)
|1035-1076||son of Berenguer Ramon I|
|Ramon Berenguer II
el Cap d'Estopes (the Towhead)
|1076-1082||son of Ramon Berenguer I, jointly with his twin brother Berenguer Ramon II|
|Berenguer Ramon II
el Fratricida (the Fratricide)
|1076-1097||son of Ramon Berenguer I, jointly with his twin brother Ramon Berenguer II (1076-1082) and later his nephew Ramon Berenguer III (1082-1097)|
|Ramon Berenguer III
el Gran (the Great)
|1082-1131||son of Ramon Berenguer II|
|Ramon Berenguer IV
el Sant (the Saint)
|1131-1162||son of Ramon Berenguer III, engaged Petronilla of Aragon in 1137 and married her in 1150.|
The succession of Ramon Berenguer IV and Petronilla to the Kingdom of Aragon led to the creation of the Crown of Aragon. The County of Barcelona formed a constituent part of this realm, and the Crown of Spain, until the Nueva Planta decrees between 1707 and 1716, when Philip declared that all Spanish kingdoms and territories should merge into a single, centralized Kingdom of Spain. In Barcelona this was promulgated in 1716. The Count of Barcelona became one of the many hereditary titles of the Spanish monarchy.
Courtesy title 
House of Bourbon, 1977-1993 
|1977-1993||claimed title from 1941; officially granted by his son Juan Carlos I in exchange for renouncing his claim to the Spanish throne|