# `Fun_Getcolorcount_new` (function)


- **Type:** FUNCTION
- **Returns:** `int`
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sJson` | `longtext` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTION `Fun_Getcolorcount_new`'`._

## Narrative

**Business context:** Unified ink-station count over a plate-color JSON list. Unlike the `_CalcQty1` / `_CalcQty2` splits, this variant treats every color entry as at least 1 station regardless of process/spot kind — useful when the planner needs a total station count.

**What it does:** walks the JSON array; for each entry, accumulates `IF(dColor > 0, dColor, 1)` from `dColor`. Returns the total. Reads `sName` but doesn't gate on it (presumably future use).

**Invocation:** Status: appears orphaned. No caller found in any channel (form-master sSqlStr, gdsmodule hooks, other routines, exhaustive xly-src grep, dynamic-dispatch search) — candidate for maintainer audit. The `_new` suffix suggests it was staged to replace `Fun_Getcolorcount` but never wired up.
