I understand the notion of Euler characteristic of an algebraic variety $X$ (say) in terms of the dimensions of the cohomology groups of $X$.
In Huybrecht's book "The Geometry of Moduli Spaces of Sheaves" he gives a definition of the Euler characteristic in terms of a pair of sheaves $(E,F)$.
The definition reads $$ \chi(E,F) := \sum_i (-1)^i \text{dim Ext}(E,F) $$ But I do not understand how this is related to the topological invariant of some underlying space. Are both $E$ and $F$ over $X$? Is $F$ a subsheaf of $E$? What is going on here exactly?
Here $E$ and $F$ are assumed to both be sheaves on $X$ (in this context, presumably something like coherent sheaves on a complete variety $X$, so that the Exts in question are finite-dimensional and the definition makes sense). There are no additional assumptions. The Euler characteristic $\chi(E,F)$ is not an invariant of $X$ itself, since it depends on the choice of $E$ and $F$. Rather, it is an invariant of the pair of sheaves $(E,F)$ on $X$.