Hmm. I was hoping someone who actually knows algebraic geometry would write an answer to this question.
First, some intuition. As it turns out, complex projective non-singular algebraic curves are the same thing as (connected) compact Riemann surfaces, which topologically are compact oriented surfaces. By the classification of compact surfaces, such surfaces are uniquely classified by a single number, their genus $g$, which counts how many holes there are in the surface. More precisely, for every $g$ there is an oriented surface $S_g$ which is the connected sum of $g$ tori (that is, it's a "doughnut with $g$ holes"), and every (connected) compact orientable surface is homeomorphic to $S_g$ for a unique $g$.
The genus $g$ has several equivalent definitions, and some of these generalize to algebraic geometry where we do not have direct access to topological information. Unfortunately, none of them are particularly easy to describe. An excellent introduction to this subject can be found in Fulton's Algebraic Curves.
So the idea is clear for non-singular curves. However, the genus turns out to be a birational invariant of curves (in particular, invariant under deletion of finitely many points), so it is possible to extend the definition of the genus to singular curves by declaring the genus of a singular curve to be the genus of a non-singular curve birational to it.
Example. Consider the singular curve $y^2 = x^3$ of degree $3$ in $\mathbb{P}^2(\mathbb{C})$ (equivalently $\mathbb{A}^2(\mathbb{C})$). It has a singular point at the origin of order $2$. Now, a non-singular curve of degree $3$ in $\mathbb{P}^2(\mathbb{C})$ has genus $1$ (see elliptic curve), but this curve doesn't: in fact, using the birational map $t \mapsto (t^2, t^3)$ we see that this curve is birational to $\mathbb{P}^1(\mathbb{C})$, hence has genus $0$.
So we see from the above that, roughly speaking, singularities decrease the "expected" genus of a curve (where "expected" means the number $\frac{(d-1)(d-2)}{2}$ that one gets from the genus-degree formula). Exactly how much singularities decrease the expected genus appears to me to be a somewhat complicated question and I am not the one to discuss it in detail. However, for "ordinary" singular points (I am not sure exactly what this means) of order $r$ it seems that the genus gets decreased by $\frac{r(r-1)}{2}$. So the genus in your first example is
$$\frac{9 \cdot 8}{2} - 3 \frac{5 \cdot 4}{2} - \frac{4 \cdot 3}{2} = 36 - 30 - 6 = 0$$
and the genus in your second example is
$$\frac{4 \cdot 3}{2} - \frac{3 \cdot 2}{2} - 3 \frac{2 \cdot 1}{2} = 6 - 3 - 3 = 0.$$
I think the reason the formula does not apply is that the singularity is not an "ordinary singularity of multiplicity r" (a.k.a. $r$ distinct lines crossing at a point).
From your second chart, we have a cusp at the origin, and if we blow it up (basically substitute $xz$ for $z$ and factor out an $x^2$ -- this is equivalent to enlarging the coordinate ring by adjoining $z/x$, which is integral over it), we're left with
$$4 x^2 z^4-5 x^2 z^2+x^2-z^2=0$$
And the lowest degree part is $x^2 - z^2 = 0 = (x-z)(x+z)$,
so locally the singularity is now ordinary of multiplicity 2. If this were the entire singularity, we would just be subtracting $1$, but since we also needed the function $z/x$ to resolve the cusp, we also subtract one more.
More details to justify the last part. For any smooth projective curve $C$, let $f: \tilde{C} \to C$ be the normalization. There is a short exact sequence
$0 \to \mathcal{O}_C \to f_*\mathcal{O}_{\tilde{C}} \to F \to 0$,
where $F$ is supported only along the singularities of $C$, and is a finite-length $\mathcal{O}_C$-module. Let its length be $\ell$. The cohomology gives
$0 \to H^0(\mathcal{F}) \to H^1(\mathcal{O}_C) \to H^1(f_*\mathcal{O}_{\tilde{C}}) \to 0$,
so in particular $g_a(C) + \ell = g(\tilde{C})$, where $g_a(C)$ means the arithmetic genus and $g(\tilde{C})$ is the geometric genus. So $\ell$ is basically "how many extra regular functions" the normalization has.
The claim is that $\ell = 2$. Resolving the cusp introduced $z/x$ to the coordinate ring. I think $z/x$ satisfies a quadratic polynomial (this is true at least locally, you can check that
$$ (1-4z^2) (z/x)^2 + (5z^2 - x^2) = 0,$$
and since the leading coefficient doesn't vanish at the origin, this is as good as a monic polynomial.)
So we've only introduced one more function in this step. Then, the second step introduces the $\tfrac{1}{2}r(r-1) = 1$ additional function to separate the two lines.
Best Answer
First, an ordinary $r$-fold singularity is one with $r$ distinct tangent directions. That's not what you have here - the equation of curve near the singular point is $z^4=f_0x^6+\cdots+f_6z^6$, and the lowest-degree term is $z^4$, so the point does not have distinct tangents. (Here, tangent directions correspond to factors of the lowest homogeneous term of an equation for the curve at the singular point.)
To actually solve the problem, we have to do a bit more. If $C$ is a curve on a surface $X$, we can produce a resolution of singularities by successively blowing up singular points until there are no more singular points. Each time we do this, the arithmetic genus drops by $\frac12 r(r-1)$, where $r$ is the multiplicity of the point we blew up, and eventually we get a smooth curve where the arithmetic genus and geometric genus are the same. (For an ordinary $r$-fold singularity, one blowup resolves it, so you can see how this procedure recovers the formula you found.)
To demonstrate this process for your curve, we blow up the point at infinity by setting $z=tx$, getting $$t^4x^4-f_0x^6-f_1x^6t-\cdots-f_6x^6t^6=x^4(t^4-f_0x^2-f_1x^2t-\cdots-f_6x^2t^6).$$ This subtracts $\frac12(4)(4-1)=6$, leaving a curve of arithmetic genus 4. The equation $t^4-f_0x^2-f_1x^2t-\cdots-f_6x^2t^6$ is the equation of the strict transform of your curve, and it's still singular at $(0,0)$. So we again blowup, setting $x=tx_1$, getting $$t^4-f_0x_1^2t^2-f_1x_1^2t^3-\cdots-f_6x_1^2t^8=t^2(t^2-f_0x_1^2-\cdots-f_6x_1^2t^6).$$ This subtracts $\frac12(2)(1)=1$, leaving a curve of arithmetic genus 3. The equation $t^2-f_0x_1^2-\cdots-f_6x_1^2t^6$ is the equation of the strict transform of your curve, and it's still singular, but one more blowup fixes it: setting $x_1=tx_2$, we get $$t^2-f_0x_2^2t^2-\cdots-f_6x_2^2t^8=t^2(1-f_0x_2^2-\cdots-f_6x_2^2t^6)$$ which is nonsingular. This again subtracts $\frac12(2)(1)=1$, leaving a curve of genus 2.
For a more detailed reference on how this works, consult a text on singularities of curves: Hartshorne chapter V section 3 is one source I've used in the past; Wall's Singular Points of Plane Curves is also fun but it's a bit longer and from a slightly different direction.