A set $S$ of vertices in a graph $G$ is a total dominating set of $G$ if every vertex of $G$ is adjacent to some vertex in $S$. The minimum cardinality of a total dominating set of $G$ is the total domination number of $G$. Let $G$ be a connected graph of order $n$ with minimum degree at least two and with maximum degree at least three. We define a vertex as large if it has degree more than $2$ and we let ${\cal L}$ be the set of all large vertices of $G$. Let $P$ be any component of $G - {\cal L}$; it is a path. If $|P| \equiv 0 \, ( {\rm mod} \, 4)$ and either the two ends of $P$ are adjacent in $G$ to the same large vertex or the two ends of $P$ are adjacent to different, but adjacent, large vertices in $G$, we call $P$ a $0$-path. If $|P| \ge 5$ and $|P| \equiv 1 \, ( {\rm mod} \, 4)$ with the two ends of $P$ adjacent in $G$ to the same large vertex, we call $P$ a $1$-path. If $|P| \equiv 3 \, ( {\rm mod} \, 4)$, we call $P$ a $3$-path. For $i \in \{0,1,3\}$, we denote the number of $i$-paths in $G$ by $p_i$. We show that the total domination number of $G$ is at most $(n + p_0 + p_1 + p_3)/2$. This result generalizes a result shown in several manuscripts (see, for example, J. Graph Theory 46 (2004), 207–210) which states that if $G$ is a graph of order $n$ with minimum degree at least three, then the total domination of $G$ is at most $n/2$. It also generalizes a result by Lam and Wei stating that if $G$ is a graph of order $n$ with minimum degree at least two and with no degree-$2$ vertex adjacent to two other degree-$2$ vertices, then the total domination of $G$ is at most $n/2$.